﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Sunboxsoft.Common;

namespace Sunboxsoft.ASMS.Server.Domain.UnitTest
{
    [TestClass]
    public class UpdateServiceUnitTest
    {
        private Service.UpdateService _service;

        public UpdateServiceUnitTest()
        {
            Logger.InitByLogDirectory(System.Configuration.ConfigurationManager.AppSettings["SYS.LogDirectory"]);
            Domain.Library.Load();
            _service = new Service.UpdateService();
        }

        [TestMethod]
        public void UpdateBookingBill()
        {
            //Guid billId = new Service.QueryService().QueryBookingBillPagedList(new Guid("{647AE906-43F8-447B-A7AB-90DCD09E41CC}"),
            //    new Guid("{0EB976A2-5A5A-4E67-A434-CD0E70E69AEA}"), null, null, null, Constant.BookingBillStatus.All, 0, 999).Data.Items[0].Id;

            //Entity.EBookingService selectedService1 = new Entity.EBookingService();
            //selectedService1.ServiceCategoryId = new Service.QueryService().QueryServiceCategoryPagedList(0, 99).Data.Items[0].Id;

            //Entity.EBookingService selectedService2 = new Entity.EBookingService();
            //selectedService2.ServiceCategoryId = new Service.QueryService().QueryServiceCategoryPagedList(0, 99).Data.Items[1].Id;

            //ServiceResult result = _service.UpdateBookingBill(billId, DateTime.Now.AddDays(20), DateTime.Now.Ticks.ToString(), new Entity.EBookingService[]{
            //    selectedService1, 
            //    selectedService2
            //});
            //Assert.IsTrue(result.IsSuccess);
        }
    }
}
